home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d18
/
nrpas13.arc
/
SNCNDN.DEM
< prev
next >
Wrap
Text File
|
1991-05-01
|
716b
|
28 lines
PROGRAM d6r30(input,output,dfile);
(* driver for routine SNCNDN *)
VAR
cn,dn,em,emmc,sn,uu,val : real;
i,nval : integer;
txt : string[26];
dfile : text;
(*$I MODFILE.PAS *)
(*$I SNCNDN.PAS *)
BEGIN
glopen(dfile,'fncval.dat');
REPEAT readln(dfile,txt) UNTIL (txt = 'Jacobian Elliptic Function');
readln(dfile,nval);
writeln(txt);
writeln('mc':4,'u':8,'actual':16,'sn':13,
'sn^2+cn^2':15,'(mc)*(sn^2)+dn^2':18);
FOR i := 1 to nval DO BEGIN
readln(dfile,em,uu,val);
emmc := 1.0-em;
sncndn(uu,emmc,sn,cn,dn);
writeln(emmc:5:2,uu:8:2,val:15:5,sn:15:5,
(sn*sn+cn*cn):12:5,(em*sn*sn+dn*dn):14:5)
END;
close(dfile)
END.